package com.allwees.bs.module.mms.mq.listener;

import com.allwees.bs.module.mms.service.RetailerService;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 *
 *
 * @author yangylsky
 * @since 2020-03-10
 *
 */
@Component
@RabbitListener(queues = "q.Merchant.RetailerApplyApproved")
public class RetailerApplySuccessListener {
    @Autowired
    private RetailerService retailerService;

    @RabbitHandler
    public void onEvent(String retailerApplyUuid) {
    	retailerService.createRetailer(retailerApplyUuid);
    }
}
